using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SysFrame.Message;
using System.Reflection;

namespace SysFrame.BP
{
    /// <summary>
    /// system_8方法
    /// </summary>
    public class BLLsystem_8
    {
        public Isystem_8 interface_system_8;

        public BLLsystem_8()
        {
            object obj = BPBase.GetAchieve("SysFrame.BP","system_8");
            interface_system_8 = (Isystem_8)obj;
        }


        /// <summary>
        /// 得到system_8实体
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public List<Mssystem_8> Getsystem_8MsByQuery(MsQuery msq)
        {
            return interface_system_8.Getsystem_8MsByQuery(msq);
        }

        /// <summary>
        /// 通过System_8_10得到实体
        /// </summary>
        /// <param name="System_8_10">ID</param>
        /// <returns>实体</returns>
        public Mssystem_8 Getsystem_8MsByKey(string System_8_10)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and System_8_10='" + System_8_10 + "' ";
            List<Mssystem_8> lstData = Getsystem_8MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        /// 通过按钮ID得到实体
        /// </summary>
        /// <param name="str30">ID</param>
        /// <returns>实体</returns>
        public Mssystem_8 Getsystem_8MsByBtnID(string str30)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and System_8_30='" + str30 + "' ";
            List<Mssystem_8> lstData = Getsystem_8MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        ///  保存system_8信息
        /// </summary>
        /// <param name="ms">实体信息</param>
        /// <returns>消息</returns>
        public MsReturned Savesystem_8(Mssystem_8 ms)
        {
            return interface_system_8.Savesystem_8(ms);
        }

        /// <summary>
        /// 得到数据类型
        /// </summary>
        /// <param name="msquery">条件</param>
        /// <returns>数据类型</returns>
        public MsReturned Getsystem_8ByQuery(MsQuery msquery)
        {
            return interface_system_8.Getsystem_8ByQuery(msquery);
        }

        /// <summary>
        /// 删除system_8
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_8ByQuery(MsQuery msq)
        {
            return interface_system_8.Deletesystem_8ByQuery(msq);
        }
        /// <summary>
        /// 删除system_8
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_8ByKey(string System_8_10)
        {
            MsQuery msquery = new MsQuery();
            
             if (System_8_10.IndexOf(",") > 0)
            {
                msquery.strquery += " and System_8_10 in (" + System_8_10 + ") ";
            }
            else
            {
                msquery.strquery += " and System_8_10='" + System_8_10 + "' ";
            }
            return interface_system_8.Deletesystem_8ByQuery(msquery);
        }
    }
}
